package com.yy.utils;

import com.yy.model.Result;

/**
 * @ClassName:       ResultUtil
 * @Description:    封装返回结果  
 * @author:            李盈盈
 * @date:            2018年2月27日        下午2:10:04
 */
public class ResultUtil {

	public static Result<Object> success(Object object) {
		Result<Object> result = new Result<Object>();
		result.setMsg("操作成功");
		//result.setData(object);
		return result;
	}

	public static Result<Object> success() {
		return success(null);
	}

	public static Result<Object> error(Integer code, String msg) {
		Result<Object> result = new Result<Object>();
		result.setCode(code);
		result.setMsg(msg);
		return result;
	}
}
